<?php


namespace app\api\model;
use think\Model;

class Feedback extends Model
{
    Public static function addFeedback($data){
        return self::create($data);
    }

    Public static function queryFeedbackList(){
        return self::select();
    }

    Public static function queryFeedbackById($id){
        $feedback = new Feedback();
        $info = $feedback->alias('f')->where(['f.id'=>$id,'f.status'=>1])
            ->join('stu_user u','f.user_id = u.user_id','left')
            ->field('f.*,u.username,u.phone')
            ->find();
        return $info;
    }
}